Abracadabra, refactor this!